package com.hspedu.homework_;

public class Cellphone{
    public void testWork(Computer computer,double n1,double n2){
        double result = computer.work(n1, n2);
        System.out.println("result=" + result);
    }
}

class TestComputer{
    public static void main(String[] args) {
        Computer computer = new Computer() {
            @Override
            public double work(double n1, double n2) {
                return n1 + n2;
            }
        };
        new Cellphone().testWork(computer,10,20);
    }
}